package cn.jsl.downgrade;

import cn.jsl.entity.User;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 服务熔断类
 */
public class FuseDowngradeUtil {
    /**
     * @Description: 熔断降级方法
     */
    public static User fuseDegradation(@PathVariable("id") Long id, Throwable  e){
        e.printStackTrace();
        return new User(-1L, "熔断服务降级触发！", "服务不可用，请稍后重试！");
    }
}
